<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {{ get_title() }}
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <link href="{{ url('img/favicon.ico') }}" rel="icon" type="image/x-icon" />
    {{ stylesheet_link('assets/bootstrap/bootstrap.min.css') }}
    {{ javascript_include('assets/jquery/jquery.min.js') }}
    {{ javascript_include('assets/bootstrap/bootstrap.min.js') }}
    <script>
        var baseUrl = '{{ url() }}';
    </script>
</head>
<body>
<div class="container" style="margin-top: 10px;">
    {{ flash.output() }}
    {{ form('help/studTempStats', 'method': 'post', 'class': 'form-group') }}
    <div class="form-inline">
        <label for="">日期：</label>
        {{ date_field('startDate', 'class': 'form-control', 'placeholder': '开始日期') }}
        <label style="margin-left: 20px; margin-right: 20px;"> ~ </label>
        {{ date_field('endDate', 'class': 'form-control', 'placeholder': '结束日期') }}
        <input type="submit" class="btn btn-success btn-sm" value="执行统计" style="width: 100px;margin-left: 20px;">
    </div>
    {{ endform() }}
    {% if tree is defined %}
        <table class="table table-striped">
            <tr class="info">
                <th style="width: 30%">目录名</th>
                <th>题目数</th>
                <th>微课数</th>
                <th>做题数</th>
                <th>正确数</th>
                <th>正确率</th>
                <th>实际做题(去重)</th>
                <th>错题刷题数</th>
                <th>错题微课数</th>
            </tr>
            {% for row in tree %}
                <tr>
                    <td>{{ row['name'] }}</td>
                    <td>{{ row['queNum'] }}</td>
                    <td>{{ row['wareNum'] }}</td>
                    <td>{{ row['brushNum'] }}</td>
                    <td>{{ row['rightNum'] }}</td>
                    <td>{{ row['rightRate'] }}%</td>
                    <td>{{ row['brushRealNum'] }}</td>
                    <td>{{ row['brushWrongNum'] }}</td>
                    <td>{{ row['wareWrongNum'] }}</td>
                </tr>
            {% endfor %}
            <tr class="success">
                <td>合计</td>
                <td>{{ total['queNum'] }}</td>
                <td>{{ total['wareNum'] }}</td>
                <td>{{ total['brushNum'] }}</td>
                <td>{{ total['rightNum'] }}</td>
                <td>{{ total['rightRate'] }}%</td>
                <td>{{ total['brushRealNum'] }}</td>
                <td>{{ total['brushWrongNum'] }}</td>
                <td>{{ total['wareWrongNum'] }}</td>
            </tr>
        </table>
    {% endif %}
</div>
</body>
</html>

